package com.sdx.payment.system.service;

import java.util.List;

import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibeetl.admin.core.util.PlatformException;

import com.sdx.payment.system.dao.CfgThirdRecordDao;
import com.sdx.payment.system.entity.CfgThirdRecord;
import com.ibeetl.admin.core.service.BaseService;

/**
 * 支付账号 Service
 */

@Service
@Transactional
public class CfgThirdRecordService extends BaseService<CfgThirdRecord>{

    @Autowired private CfgThirdRecordDao cfgThirdRecordDao;

    public PageQuery<CfgThirdRecord>queryByCondition(PageQuery query){
        PageQuery ret =  cfgThirdRecordDao.queryByCondition(query);
        queryListAfter(ret.getList());
        return ret;
    }

    public void batchDelCfgThirdRecord(List<String> ids){
        try {
            cfgThirdRecordDao.batchDelCfgThirdRecordByIds(ids);
        } catch (Exception e) {
            throw new PlatformException("批量删除支付账号失败", e);
        }
    }
}